package me.zhengjie.inter.service.impl;

import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.base.WeightVo;
import me.zhengjie.business.domain.AdlZhsq;
import me.zhengjie.business.domain.Msg;
import me.zhengjie.business.domain.Zhsq;
import me.zhengjie.business.repository.AdlZhsqRepository;
import me.zhengjie.business.repository.MsgRepository;
import me.zhengjie.business.repository.ZhsqRepository;
import me.zhengjie.business.service.SbgsService;
import me.zhengjie.business.service.YbryService;
import me.zhengjie.business.service.dto.*;
import me.zhengjie.business.service.mapstruct.ZhsqMapper;
import me.zhengjie.config.DebugProperties;
import me.zhengjie.domain.LocalStorage;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.inter.service.MpMsgService;
import me.zhengjie.inter.service.MpZhsqService;
import me.zhengjie.repository.LocalStorageRepository;
import me.zhengjie.utils.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.sql.Timestamp;
import java.util.*;

/**
 * @description 服务接口
 * @author xiahongbo
 * @date 2022-07-10
 **/
@Slf4j
@Service
@RequiredArgsConstructor
public class MpMsgServiceImpl implements MpMsgService {

    private final MsgRepository msgRepository;


    @Override
    @Transactional
    public Msg create(Msg resources) {
        resources.setBisMsgId(IdUtil.simpleUUID());

        resources.setTimes(0);
        resources.setStatus("0");
        msgRepository.save(resources);
        return resources;
    }

}
